<%@ page pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="t" uri="http://tiles.apache.org/tags-tiles"%>
<t:insertDefinition name="main">
	<t:putAttribute name="title" type="string">List Users</t:putAttribute>
	<t:putAttribute name="central" type="string">

        <a href="<c:url value="/create.do" />">Create</a><br /><br />

        <table border="1" cellspacing="0" cellpadding="5">
            <thead>
                <tr>
                    <th>Username</th>
                    <th>Full Name</th>
                </tr>
            </thead>
            <tbody>
                <c:forEach var="user" items="${userList}">
                <tr>
                    <td><a href="<c:url value="/view.do?userId=${user.id}"/>">${user.username}</a></td>
                    <td>${user.fullName}</td>
                </tr>
                </c:forEach>
            </tbody>
        </table>

    </t:putAttribute>
</t:insertDefinition>